#include "player.h"

Player::Player(QWidget *parent) : QWidget(parent)
{

}

Player::Player(const QString &name, QWidget *parent)
{
    //初始化名字和分数
    m_name = name;
    m_score = 0;
}

QString Player::getName()
{
    return m_name;
}

void Player::setSex(Player::Sex sex)
{
    m_sex = sex;
}

Player::Sex Player::getSex()
{
    return m_sex;
}

void Player::setRole(Player::Role role)
{
    m_role = role;
}

Player::Role Player::getRole()
{
    return m_role;
}

void Player::setDiretion(Player::Direction dire)
{
    m_dire = dire;
}

Player::Direction Player::getDiretion()
{
    return m_dire;
}

void Player::setScore(int score)
{
    m_score = score;
}

int Player::getScore()
{
    return m_score;
}

void Player::setIswin(bool win)
{
    IsWin = win;
}

bool Player::getIswin()
{
    return IsWin;
}

void Player::setPrePlayer(Player *player)
{
    PrePlayer = player;
}

Player *Player::getPrePlayer()
{
    return PrePlayer;
}

void Player::setNextPlayer(Player *player)
{
    NestPlayer = player;
}

Player *Player::getNextPlayer()
{
    return NestPlayer;
}

void Player::grapLander(int point)
{
    //抢地主的逻辑
}

void Player::storeDiapachCard(Card card)
{
    m_cards.addCard(card);
}

void Player::storeDiapatchCards(Cards cards)
{
    m_cards.addCards(cards);
}

void Player::clearCards()
{
    m_cards.clear();
}

Cards* Player::getCards()
{
    return &m_cards;
}

void Player::playCards(Cards cards)
{
    m_cards.removeCards(cards);
}

void Player::setPenCardInfo(Cards cards, Player *player)
{
    m_Pencards.addCards(cards);
    m_PenPlayer = player;
}

Player *Player::getPenPlayer()
{
    return m_PenPlayer;
}

Cards *Player::getPenCards()
{
    return  &m_Pencards;
}


























